"use strict";
/// <reference types="../../../../../node_modules/.vue-global-types/vue_3.5_false.d.ts" />
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
var vue_1 = require("vue");
var __VLS_props = defineProps({
    filePath: {
        type: String,
        required: true,
        default: ''
    }
});
var image = (0, vue_1.ref)();
var rollImg = function (e) {
    var _a;
    var transform = (_a = image.value) === null || _a === void 0 ? void 0 : _a.style.transform;
    var zoom = (transform === null || transform === void 0 ? void 0 : transform.indexOf("scale")) != -1 ? +transform.split("(")[1].split(")")[0] : 1;
    zoom += e.wheelDelta / 1200;
    if (zoom > 0.1 && zoom < 5) {
        image.value.style.transform = "scale(" + zoom + ")";
    }
};
var moveImg = function (e) {
    var x = e.clientX;
    var y = e.clientY;
    var left = x - e.target.offsetLeft;
    var top = y - e.target.offsetTop;
    document.onmousemove = function (ev) {
        e.target.style.left = ev.clientX - left + 'px';
        e.target.style.top = ev.clientY - top + 'px';
    };
    document.onmouseup = function () {
        document.onmousemove = null;
    };
}; /* PartiallyEnd: #3632/scriptSetup.vue */
function __VLS_template() {
    var __VLS_ctx = {};
    var __VLS_components;
    var __VLS_directives;
    // CSS variable injection 
    // CSS variable injection end 
    __VLS_elementAsFunction(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)(__assign({ onMousewheel: (__VLS_ctx.rollImg) }, { class: ("wrap") }));
    __VLS_elementAsFunction(__VLS_intrinsicElements.img)(__assign({ onMousedown: (__VLS_ctx.moveImg) }, { src: ((__VLS_ctx.filePath)), alt: ("1111"), ref: ("image") }));
    // @ts-ignore navigation for `const image = ref()`
    /** @type { typeof __VLS_ctx.image } */ ;
    ['wrap',];
    var __VLS_slots;
    var $slots;
    var __VLS_inheritedAttrs;
    var $attrs;
    var __VLS_refs = {
        'image': __VLS_nativeElements['img'],
    };
    var $refs;
    var $el;
    return {
        attrs: {},
        slots: __VLS_slots,
        refs: $refs,
        rootEl: $el,
    };
}
;
var __VLS_self = (await Promise.resolve().then(function () { return require('vue'); })).defineComponent({
    setup: function () {
        return {
            image: image,
            rollImg: rollImg,
            moveImg: moveImg,
        };
    },
    props: {
        filePath: {
            type: String,
            required: true,
            default: ''
        }
    },
});
exports.default = (await Promise.resolve().then(function () { return require('vue'); })).defineComponent({
    setup: function () {
        return {};
    },
    props: {
        filePath: {
            type: String,
            required: true,
            default: ''
        }
    },
    __typeRefs: {},
    __typeEl: {},
});
; /* PartiallyEnd: #4569/main.vue */
